libostree: Add initial GRUB2 support
authorColin Walters <walters@verbum.org>
Sat, 11 Oct 2014 12:59:06 +0000 (08:59 -0400)
committerColin Walters <walters@verbum.org>
Thu, 16 Oct 2014 18:15:00 +0000 (14:15 -0400)
commitd546abfa2a8c527d548b1be0ceea9c46d5faf2e3
tree45403c302bbe34ab7828c5073f9ad39898df8bd8
parent92c5a9f99211c10b506294164e4bfd1ff66639c7
libostree: Add initial GRUB2 support

In this approach, we drop a /etc/grub.d/15_ostree file which is a
hybrid of shell/C that picks up bits from the GRUB2 library (e.g. the
block device script generation), and then calls into libostree's
GRUB2 code which knows about the BLS entries.

This is admittedly ugly.  There exists another approach for GRUB2 to
learn the BLS specification.  However, the spec has a few issues:

https://www.redhat.com/archives/anaconda-devel-list/2014-July/msg00002.html

This approach also gives a bit more control to the admin via the
naming of the 15_ostree symlink; they can easily disable it:

Or reorder the ostree entries ahead of 10_linux:

Also, this approach doesn't require patches for grub2, which is an
issue with the pressure to backport (rpm-)OSTree to EL7.
19 files changed:
Makefile-boot.am
Makefile-decls.am
Makefile-libostree.am
Makefile-ostree.am
configure.ac
packaging/ostree.spec.in
src/boot/grub2-15_ostree [new file with mode: 0644]
src/libostree/ostree-bootloader-grub2.c [new file with mode: 0644]
src/libostree/ostree-bootloader-grub2.h [new file with mode: 0644]
src/libostree/ostree-bootloader.c
src/libostree/ostree-bootloader.h
src/libostree/ostree-cmdprivate.c [new file with mode: 0644]
src/libostree/ostree-cmdprivate.h [new file with mode: 0644]
src/libostree/ostree-sysroot-deploy.c
src/libostree/ostree-sysroot.c
src/ostree/ot-admin-builtin-instutil.c
src/ostree/ot-admin-instutil-builtin-grub2-generate.c [new file with mode: 0644]
src/ostree/ot-admin-instutil-builtins.h
tests/test-admin-deploy-grub2.sh [new file with mode: 0755]